package com.zfast.spring5.junit;

import com.zfast.spring5.MD5Util;
import org.junit.jupiter.api.Test;
import org.springframework.util.DigestUtils;

import java.nio.charset.Charset;

/**
 * @author zgn
 * @Description: simJunit
 * @date 2022/1/13 0013
 */
public class utilsJunit {
    @Test
    public void egMin() {//e.g.
        System.out.println();
    }

    @Test
    public void egMax() {//e.g.
        //region 模拟数据
        System.out.println("--------------------Start--------------------");
        //endregion

        //region 数据处理
        System.out.println("--------------------Deal--------------------");
        //endregion

        //region 数据展示
        System.out.println("--------------------Done--------------------");
        //endregion
    }

    @Test
    public void md5_egMin() {//e.g.
        System.out.println(MD5Util.encode("123456"));//330c52c7e1e94a47712f39b16188dbd9
        //e10adc3949ba59abbe56e057f20f883e
        String newpwd ="123456";
        String md5newpwd = DigestUtils.md5DigestAsHex(newpwd.getBytes(Charset.forName("UTF-8")));
        System.out.println(md5newpwd);
    }
}
